Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revamps SSoT cookie for contrib pattern #203

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

Kircheneer
Copy link
Contributor

@Kircheneer Kircheneer commented Dec 10, 2024

I have revamped the SSoT cookie to match the new nautobot_ssot.contrib pattern. As such, I have also simplified the folder layout:

  • Collapse both adapters into one file, as the Nautobot adapter is significantly (90% LoC) simpler with contrib
  • Collapse all models into one class per Nautobot content type - the differentiation between base, SoR and Nautobot is in my opinion no longer needed

TODO

  • Support outgoing syncs by stubbing out the create, update, and delete methods of the model and adding a question to .cookiecutter.json for the direction of the snyc

@Kircheneer
Copy link
Contributor Author

Outgoing syncs can't really use contrib as we want to model the diffsync models after the destination system, so the direction toggle makes a lot of sense.

- collapses both adapters into one file, asthe Nautobot adapter is
  significantly simpler with contrib collapse all models into one
  class per Nautobot content type -> users are of course free to change
  this but I found that for most SSoTs this is unnecessary complexity
- the differentation between base, SoR and Nautobot seems not necessary
  because SSoTs that sync both way simply don't exist
- add a "direction_of_sync" cookiecutter variable to define whether
  contrib classes are used or not depending on direction of sync
jdrew82
jdrew82 previously approved these changes Dec 16, 2024
Copy link
Contributor

@jdrew82 jdrew82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one change to consider.

@jvanderaa
Copy link
Contributor

Looking good. I am unable to merge.

Copy link
Contributor

@jdrew82 jdrew82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jdrew82 jdrew82 merged commit 14f350a into develop Dec 18, 2024
2 checks passed
@jdrew82 jdrew82 deleted the ssot-cookie-revamp branch December 18, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants